package AbstractTransaction

import (
	"SalaryPayment/Model"
	"fmt"
	"log"
)

type MethodTransaction interface {
	GetMethod() Model.PaymentMethod
}

type ChangeMethodTransaction struct {
	ChangeEmployeeTransaction
	MethodTransaction
}

func (transaction *ChangeMethodTransaction) Change(employee *Model.Employee) {
	pm := transaction.GetMethod()
	employee.SetMethod(pm)
}

func (transaction *ChangeMethodTransaction) Pay(pc Model.Salarycheck) {
	err := fmt.Errorf("The method or operation is not implemented.")
	log.Println(err.Error())
}
